<div class="wrap">
 	<div id="icon-index" class="icon32"><br /></div><h2><?php echo ucwords(str_replace('_',' ',$this->uri->segment(1)));?> &raquo; <?php echo ucwords(str_replace('_',' ',$this->uri->segment(2)));?></h2>
</div>
<div id="wpbody-content">
    <div class="metabox-holder" id="dashboard-widgets">
            <div class="inside">
				<div id="filter_panel">
					<form action="<?php echo current_url();?>" method="get" name="SearchForm" id="SearchForm">
					<ul>
						<li>
							<span><?php echo lang('cat_id');?> :</span>
							<input type="text" name="cat_id" id="cat_id" value="<?php echo @$this->input->get('cat_id');?>"/>
						</li>						
					</ul>
					<br />
					&nbsp;&nbsp;<input type="submit" value="<?php echo lang('button_search');?>" class="button-primary"/>
					<input type="reset" value="<?php echo lang('button_reset');?>" class="button-primary"/>
					</form>
				</div>			
				<div class="tablenav top">
					<div class="alignleft">
						<input type="button" onclick="javascript:update_Form(this,'ListForm','<?php echo current_url();?>/update')" class="button-primary" value="<?php echo lang('button_update');?>" />&nbsp;
						<strong><?php echo lang('all_active');?></strong> <?php echo $totalActive;?>
					</div>
					<div class="alignright">
						<input type="button" onclick="javascript:parent.location='<?php echo current_url();?>/refresh'" class="button-primary" value="<?php echo lang('button_refresh');?>" />
						<input type="button" onclick="javascript:toggleFilter(this);" class="button-primary" value="<?php echo lang('button_filter');?>" />
					</div>
				</div>		
				<form action="<?php echo current_url();?>/delete" method="post" name="ListForm" id="ListForm">
				<table cellspacing="0" class="wp-list-table widefat fixed">
					<thead>
					<tr>
						<?php 
							echo generate_th_orderby(array(
								array(
									'name' => '<input type="checkbox"/>',
									'templates' => 'checkbox'
								),
								array(
									'name' => lang('tools'),
									'templates' => 'tools'
								),
								array(
									'name' => lang('user_id'),
									'width' => 150
								),
								array(
									'name' => lang('cat_id'),
									'width' => 150
								),								
								array(
									'name' => lang('message')
								),
								array(
									'name' => lang('likes'),
									'width' => 100	
								),								
								array(
									'name' => lang('fb_time')
								)
							));
						?>
					</tr>
					</thead>
				
					<tfoot>
					<tr>
						<?php 
							echo generate_th_orderby(array(
								array(
									'name' => '<input type="checkbox"/>',
									'templates' => 'checkbox'
								),
								array(
									'name' => lang('tools'),
									'templates' => 'tools'
								),
								array(
									'name' => lang('user_id'),
									'width' => 150
								),
								array(
									'name' => lang('cat_id'),
									'width' => 150
								),								
								array(
									'name' => lang('message')
								),
								array(
									'name' => lang('likes'),
									'width' => 100
								),							
								array(
									'name' => lang('fb_time')
								)
							));
						?>
					</tr>
					</tfoot>
				
					<tbody>
						<?php
						if(!empty($dataResult)):
							foreach($dataResult as $key => $value):
						?>
							<tr>
								<th class="check-column clean-column" scope="row">
									<input name="check_box[]" value="<?php echo $value->comment_id;?>" type="checkbox" <?php echo ($value->is_active ? 'checked="checked"':'');?>/>
								</th>
								<td class="toolsets">
									<a href="<?php echo $value->url;?>" class="tools magnify" title="<?php echo lang('tool_magnify');?>" target="_blank"></a>
								</td>
								<td class=""><?php echo $value->user_id;?></td>
								<td class=""><?php echo $value->cat_id;?></td>
								<td class=""><?php echo $value->message;?></td>
								<td class=""><?php echo $value->likes;?></td>
								<td class=""><?php echo $value->fb_time;?></td>
							</tr>
							<?php
							endforeach;
						else: //not exists
							?>
							<tr valign="middle" class="alternate"><td colspan="7"><?php echo lang('no_data');?></td></tr>			
						<?php
						endif;
						?>
					</tbody>
				</table>
				<div class="tablenav bottom"></div>
				</form>
            </div><!-- wpbody inside -->
    </div><!-- wpcontent -->
</div><!-- wpbody-content -->